class SingletonMeta(type):
    _instances = {}

    def __call__(cls, *args, **kwargs):
        if cls not in cls._instances:
            instance = super().__call__(*args, **kwargs)
            cls._instances[cls] = instance
        return cls._instances[cls]

# class SingletonClass(metaclass=SingletonMeta):
#     def __init__(self, value):
#         self.value = value
#         print(f"Initialized with value: {value}")

# # Example usage
# obj1 = SingletonClass(42)  # Output: Initialized with value: 42
# obj2 = SingletonClass(99)  # No output (instance already exists)

# print(obj1 is obj2)        # Output: True
# print(obj1.value)          # Output: 42
# print(obj2.value)          # Output: 42 (value from first initialization)
